<%@ page language="java"  pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="<s:url value="/style.css"/>" rel="stylesheet" type="text/css"/>
<title>View Appointment</title>
</head>
<body>
	<jsp:include page="/navigation/navigation.jsp"/>
	<div id="mainBox">
		<center><h2>View Appointment Information</h2></center>
		<center>
			<table width="400px">
				<tr>
					<td>ID:</td>
					<td><s:property value="retrievedAppointment.appointmentId"/></td>
				</tr>
				<tr>
					<td>Patient Name:</td>
					<td><s:property value="retrievedAppointment.patient.name"/></td>
				</tr>
				<tr>
					<td>Doctor Name:</td>
					<td><s:property value="retrievedAppointment.doctor.name"/></td>
				</tr>
				<tr>
					<td>Date:</td>
					<td><s:property value="retrievedAppointment.appointmentDate"/></td>
				</tr>
				<tr>
					<td>Start time:</td>
					<td><s:property value="retrievedAppointment.startTime"/></td>
				</tr>
				<tr>
					<td>End time:</td>
					<td><s:property value="retrievedAppointment.endTime"/></td>
				</tr>
				<tr>
					<td>Location:</td>
					<td><s:property value="retrievedAppointment.location"/></td>
				</tr>
				<tr>
					<s:if test="retrievedAppointment.status==0 && #session.get('currentUser').getType()==1">
					<td>
					   <a href="<s:url value='initVisitationCreatePage.action'>
					   <s:param name ="selectedAppointmentId" value ="retrievedAppointment.appointmentId"/>
					   </s:url>">Create Visitation</a>
					</td>
					</s:if>
				</tr>
			</table>
			<div id="actionResult"><s:property value="#session.actionResult"/></div>
		</center>
	</div>	
</body>
</html>